home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / plain / contrib / rcs.tex < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.5 KB  |  48 lines

  1. \catcode`\@=11
  2. %%
  3. %% REVISION CONTROL [by kris@diku.dk].
  4. %%
  5. %% \thedate
  6. %% \therevision
  7. %%    These contain the date and revision of this paper, set by the
  8. %%    following revision control commands.  Default to the current date and
  9. %%    to nothing.
  10. %%
  11. %% \RCSdate$...$
  12. %% \RCSrevision$...$
  13. %%    Modify the date and revision of the paper as given by the RCS
  14. %%    variables Date and Revision (not inserted above because then RCS
  15. %%    would interfere with this comment).  Use before \Draft.
  16. %%
  17. %% \Draft
  18. %% \ifdraft...\else...\fi
  19. %%    \Draft prepends ``Draft'' to \therevision and sets \drafttrue.
  20. %%
  21. \edef\today{\ifcase\month\or January\or February\or March\or April\or
  22.   May\or June\or July\or August\or September\or October\or November\or
  23.   December\fi\space\number\day, \number\year}
  24. \def\eat@#1{}
  25. %%
  26. \def\thedate{\today}
  27. \def\therevision{}
  28. %%
  29. \def\RCSdate$Date{%
  30.  \def\next@{%
  31.   \ifx\next$\let\nextii@=\eat@\else\let\nextii@=\RCSdate@\fi\nextii@}%
  32.  \futurelet\next\next@}
  33. \def\RCSdate@: #1/#2/#3 #4 ${\xdef\thedate{%
  34.   \ifcase#2\or January\or February\or March\or April\or
  35.    May\or June\or July\or August\or September\or October\or November\or
  36.    December\fi\space\ignorespaces#3, \ifnum#1<100\relax19\fi#1}}
  37. %%
  38. \def\RCSrevision$Revision{%
  39.  \def\next@{%
  40.   \ifx\next$\let\nextii@=\eat@\else\let\nextii@=\RCSrevision@\fi\nextii@}%
  41.  \futurelet\next\next@}
  42. \def\RCSrevision@: #1 ${\xdef\therevision{[#1]}}
  43. %%
  44. \newif\ifdraft
  45. \def\Draft{\xdef\therevision{Draft \therevision}\drafttrue}
  46. %%
  47. \catcode`\@=\active
  48.